vcUnitFamily
Unit family is a collection of units that belong to the same system of measurements. This unit family concept is not a strict definition rather a way to simplify unit selection.
See in: Overview
Module: vcCore
Parent: vcObject
Children -
Referenced by: vcUnitManager.CurrentUnitFamily, vcUnitManager.UnitFamilies, vcUnitManager.createUnitFamily(), vcUnitManager.findUnitFamily()
Properties
Learn how to use properties here. The properties are also inherited from the parent class.
| Name | Type | Access | Description |
| Groups | vcList[vcUnitGroup] | R | Gets a list of all unit groups in unit family. |
| IsBuiltIn | Boolean | R | Gets a value which defines if the unit family is a built-in type.See moreIf True, adding and removing custom unit groups from unit family is allowed but not for built-in unit groups. |
| Name | String | RW | Gets or sets unit family name. Exceptions: ValueError: When given name is empty or not unique. |
Methods
Learn how to use methods here. The methods are also inherited from the parent class.
| Name | Return Type | Parameters | Description |
| addGroup | Integer | vcUnitGroup group | Adds a given unit group to unit family.See moreParameters: group (vcUnitGroup): A unit group to add to the unit family. Returns: Integer: Returns the index of the unit group in unit family. |
| containsGroup | Boolean | vcUnitGroup group | Returns True if a given unit group is in the unit family; otherwise returns False.See moreParameters: group (vcUnitGroup): A unit group to search for in the current unit family. Returns: Boolean: Returns True if this unit family contains given unit group; otherwise False. |
| delete | None | None | Deletes the unit family. Exceptions: RuntimeError: When deleting a built-in unit family object. |
| removeGroup | Boolean | vcUnitGroup group | Removes a given unit group from unit family.See moreParameters: group (vcUnitGroup): A unit group to add to remove from unit family. Exceptions: ValueError: When current unit family and given unit group are built-in. Returns: Boolean: Returns True if removal was successful, otherwise False. |